<!--- 
@%HEADER%@


Copyright @%CUR_YEAR%@ Seb Duggan

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--->

<cfoutput>

<form method="post" action="#cgi.script_name#">
		
	<fieldset>
		<legend>General settings</legend>
		<p>
			<label for="loginFailText">Login failure message</label>
			<span class="hint">Text to be displayed when login fails.</span>
			<span class="field"><input type="text" id="loginFailText" name="loginFailText" class="required" value="#HTMLEditFormat(getSetting("loginFailText"))#" size="40"/></span>
		</p>
		
		<p>
			<input type="checkbox" value="1" id="useStatus403" name="useStatus403" <cfif getSetting("useStatus403") eq 1>checked="checked" </cfif>/>
			<label for="useStatus403">Return HTTP Status 403 when not logged in</label>
			<span class="hint">If a restricted page is requested when not logged in, a "403 Forbidden" status will be returned, which should prevent search engines from indexing the page.</span>
		</p>
	</fieldset>
	
	<fieldset>
		<legend>Pod settings</legend>
		<p>
			<label for="podTitle">Pod title</label>
			<span class="hint">Enter the title you wish to give your login pod.</span>
			<span class="field"><input type="text" id="podTitle" name="podTitle" class="required" value="#HTMLEditFormat(getSetting("podTitle"))#" size="40"/></span>
		</p>
		<p>
			<label for="publicHomePage">Public site homepage</label>
			<span class="hint">This is the public homepage the user will go to when logging out. Include the trailing "/".</span>
			<span class="field"><input type="text" id="publicHomePage" name="publicHomePage" class="required" value="#HTMLEditFormat(getSetting("publicHomePage"))#" size="40"/></span>
		</p>
		
		<p>
			<label for="podTextLogout">Logged-in text</label>
			<span class="hint">This text will appear in the pod when the user is logged in. <strong>{name}</strong> is replaced by the user's full name. Enter one line of plain text ("logout" link is added automatically).</span>
		    <span class="field"><textarea id="podTextLogout" name="podTextLogout" cols="60" rows="3" class="required">#HTMLEditFormat(getSetting("podTextLogout"))#</textarea></span>
		</p>
	</fieldset>
	
	<fieldset>
		<legend>Restricted page settings</legend>
		
		<p>
			<label for="restrictedTitle">Title</label>
			<span class="hint">Enter the title you wish to give your page if login is required. This will only show if the setting above is not checked.</span>
			<span class="field"><input type="text" id="restrictedTitle" name="restrictedTitle" class="required" value="#HTMLEditFormat(getSetting("restrictedTitle"))#" size="40"/></span>
		</p>
		
		<p>
			<label for="restrictedHTML">Body</label>
			<span class="hint">This block of HTML will appear before the log-in form on each restricted page.</span>
		    <span class="field"><textarea id="restrictedHTML" name="restrictedHTML" cols="60" rows="12" class="htmlEditor">#HTMLEditFormat(getSetting("restrictedHTML"))#</textarea></span>
		</p>

	</fieldset>
	
	<div class="actions">
		<input type="submit" class="primaryAction" value="Submit"/>
		<input type="hidden" name="action" value="event" />
		<input type="hidden" name="event" value="TwoMangoesPrivateSettings" />
		<input type="hidden" name="apply" value="true" />
		<input type="hidden" name="selected" value="TwoMangoesPrivate" />
	</div>


</cfoutput>